﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EQT.Dal;

public partial class selectpca : System.Web.UI.Page
{
    //private DaProductCheckAbility daPCA = DevFuture.Common.WorkContext.AppCtx.GetObject("DaProductCheckAbility") as DaProductCheckAbility;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {         
            LoadPCADs();
        }
    }

    protected void AspNetPager_PageChanged(object sender, EventArgs e)
    {
        LoadPCADs();
    }

    private void LoadPCADs()
    {
        int totalCount = 0;
        DataSet ds = DaCommon.GetPaginationData(DaProductCheckAbility.SQL_SELECT, AspNetPager.PageSize, AspNetPager.CurrentPageIndex-1,
            " PCA_ID ", out totalCount);
        if (ds != null)
        {
            this.GridViewPCA.DataSource = ds;
            GridViewPCA.DataBind();
            AspNetPager.RecordCount = totalCount;
        }
        
    }
}
